package org.example.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface AccountMapper {

    //转出
    @Update("update t_account set balance=balance-#{money} where account=#{account}")
    void outBalance(@Param("account") String account, @Param("money") int money);


    //转入
    @Update("update t_account set balance=balance+#{money} where account=#{account}")
    void inBalance(@Param("account")String account,@Param("money") int money);

}
